Skip to content

Qualified table identidiers#4416

Draft
ilidemi wants to merge 25 commits into
mainfrom
qualified-table-identifiers
Draft

Qualified table identidiers#4416
ilidemi wants to merge 25 commits into
mainfrom
qualified-table-identifiers

Conversation

@ilidemi

@ilidemi ilidemi commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

WIP

ilidemi added 23 commits June 11, 2026 21:43
- Table-only destinations (ClickHouse, Elasticsearch) derive physical names via
  LegacyDotted so legacy dotted destinations keep targeting the same table/index
- Add-tables signal path validates additions against the flow's existing tables;
  structural identifier validation runs even with skip_validation; source dotted
  collisions rejected (duplicate clone workflow IDs)
- Missing entry normalization added: RemoveTablesFromRawTable, QRepHasNewRows,
  SetupQRepMetadataTables activities and QRepWaitForNewRowsWorkflow
- Legacy fallbacks when consuming activity outputs recorded by old releases
- Continue-As-New payloads denormalized for rollback safety (continue_as_new.go)
- InitialLoadSummary recomposes LegacyDotted names from qrep_runs split columns
- CancelTableAddition response denormalized; telemetry reads structs;
  reset_sequences handles empty-namespace destinations; ScopedEventhub rejects
  extra dots; QRep watermark validation; UI QRep destination re-parsed at submit;
  UI removals reuse canonical mappings; delete ParseTableIdentifier (plan 1.3)
- SF golden MERGE SQL byte-identical to pre-refactor generator (fixture captured
  by running the merge-base generator); dotted per-component quoting + LegacyDotted
  toast-map keying
- BQ raw-name filter pinned to LegacyDotted; CH legacy-normalized dotted
  destination BuildQuery test
- Dotted CTID partitioning unit test (dotted schema/parent/children)
- E2e: dotted partitioned-parent ctid QRep, initial-snapshot-only dotted mirror,
  add-tables union validation rejections, skip-validation structural check,
  source dotted collision
- Snapshot clone workflow ID pinned to the legacy format; pua record.target/source
  legacy-dotted test; schema-helpers dotted overlap tests; Normalize*/Denormalize*
  helper round-trips
- SF dotted e2e namespace suffixed to avoid cross-run collisions
- Review findings doc + progress doc updated
Ports #4414 (shared destinations / N:1 mappings) to QualifiedTable structs:
- processTableRemovals keys remainingDestinations/exclusivelyRemovedTables by
  struct instead of the (cleared) legacy string identifiers
- RemoveTablesFromRawTable dedupes destination structs + keeps main's early exit
- ClickHouse RemoveTableEntriesFromRawTable chunks IN-lists over LegacyDotted names
- validateTableMappingIdentifiers now permits exact-duplicate destinations (N:1 is
  supported per #4414); dotted-rendering collisions between DIFFERENT destinations
  are still rejected; e2e duplicate-destination rejection cases dropped accordingly
- ui schema.ts resolved to main's version (duplicate-destination check removed)
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
2395 2 2393 201
View the top 1 failed test(s) by shortest run time
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuitePG
Stack Traces | 0s run time
=== RUN   TestPeerFlowE2ETestSuitePG
=== PAUSE TestPeerFlowE2ETestSuitePG
=== CONT  TestPeerFlowE2ETestSuitePG
--- FAIL: TestPeerFlowE2ETestSuitePG (0.00s)
View the full list of 1 ❄️ flaky test(s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuitePG/Test_Dynamic_Mirror_Config_Via_Signals

Flake rate in main: 17.02% (Passed 312 times, Failed 64 times)

Stack Traces | 20.2s run time
=== RUN   TestPeerFlowE2ETestSuitePG/Test_Dynamic_Mirror_Config_Via_Signals
=== PAUSE TestPeerFlowE2ETestSuitePG/Test_Dynamic_Mirror_Config_Via_Signals
=== CONT  TestPeerFlowE2ETestSuitePG/Test_Dynamic_Mirror_Config_Via_Signals
    postgres_test.go:1070: Inserted 18 rows into the source table
2026/06/12 09:21:56 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table="\"e2e_test_mychg_lcddl3oc\".\"test_ddl_drop_column\""
    postgres_test.go:1070: Inserted 18 rows into the source table
    postgres_test.go:1079: WaitFor normalize 18 records - first table 2026-06-12 09:22:00.912270384 +0000 UTC m=+120.392472175
2026/06/12 09:22:00 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table="\"e2e_test_mychg_lcddl3oc\".\"test_ddl_drop_column\""
    postgres_test.go:1087: 
        	Error Trace:	.../flow/e2e/postgres_test.go:1087
        	Error:      	"map[]" should have 1 item(s), but has 0
        	Test:       	TestPeerFlowE2ETestSuitePG/Test_Dynamic_Mirror_Config_Via_Signals
    postgres_test.go:1133: WaitFor finish 2026-06-12 09:22:01.919374443 +0000 UTC m=+121.399576234
2026/06/12 09:22:01 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table="\"e2e_test_mychg_lcddl3oc\".\"test_ddl_drop_column\""
    postgres_test.go:1133: Finished Status Canceled
    postgres.go:92: begin tearing down postgres schema pg_a1zgfhta
2026/06/12 09:22:02 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table="\"e2e_test_mychg_lcddl3oc\".\"test_ddl_drop_column\""
--- FAIL: TestPeerFlowE2ETestSuitePG/Test_Dynamic_Mirror_Config_Via_Signals (20.19s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: The "qualified-table-identifiers" PR deterministically broke SrcTableIdNameMapping population — Test_Dynamic_Mirror_Config_Via_Signals fails identically across all three matrix jobs with an empty map ("should have 1 item(s), but has 0"), which is a real regression rather than a timeout/race/network flake.
Confidence: 0.95

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

ilidemi added 2 commits June 12, 2026 02:37
Entry normalization clears the legacy SrcTableIdNameMapping in workflow state;
these two assertions were missed in the suite conversion (the PG suite doesn't
run on the local dev stack, so first caught by CI).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant